package com.server;

import com.doman.StuConditions;
import com.doman.Student;
import com.doman.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
@Mapper
public interface StudentMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Student record);

    int insertSelective(Student record);

    Student selectByPrimaryKey(Integer id);


    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);

    //查询学生信息绑定码和名称是否相符
    Student selectByPrimaryBindCodeAndName(Student student);


    int updateByBindCode(Student record);

    int delByBindCode(String bindcode);

    List<Student> selectAll();

    /**
     * 新增学生不得有重复学籍号
     * @param record
     * @return
     */
    int insertSelectiveByEducode(Student record);


    //修改学生信息
    /**
     * 学生数据检索
     * @param stuConditions
     * @return list<Student>
     */
    List<Student> selectByCondition(StuConditions  stuConditions);

    //根据CurrentCode当前用户登录学生查询学生信息
    Student selectByPrimaryByCurrentCode(Student student);

    //根据CurrentCode当前用户登录学生查询学生信息
    Student selectByPrimaryByBindcode(String student);


}
